//
//  WeakScriptMessageDelegate.swift
//  d11
//
//  Created by peale_pro on 2019/7/26.
//  Copyright © 2019年 Tech_001. All rights reserved.
//

import UIKit
import WebKit
class WeakScriptMessageDelegate: NSObject,WKScriptMessageHandler  {
    weak var scriptDelegate: WKScriptMessageHandler?
    init(_ scriptDelegate: WKScriptMessageHandler) {
        self.scriptDelegate = scriptDelegate
        super.init()
    }
    func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
        scriptDelegate?.userContentController(userContentController, didReceive: message)
    }
    deinit {
        print("WeakScriptMessageDelegate is deinit")
    }
}
